﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;
using ICeFramework.Common.Extenstions;

namespace ICeFramework.Web.Common
{
    public class Configuration
    {
        //public static bool GetBool(string key)
        //{
        //    string val = ConfigurationManager.AppSettings[key];
        //    return val.Parse<bool>();
        //}

        //public static string GetString(string key)
        //{
        //    return ConfigurationManager.AppSettings[key];
        //}

        //public static int GetInt(string key)
        //{
        //    string val = ConfigurationManager.AppSettings[key];
        //    return val.Parse<int>();
        //}

        //public static float GetFloat(string key)
        //{
        //    string val = ConfigurationManager.AppSettings[key];
        //    return val.Parse<float>();
        //}

        public static T GetValue<T>(string key)
        {
            string val = ConfigurationManager.AppSettings[key];
            return val.Parse<T>();
        }
    }
}
